<?php
namespace app\index\controller;

use app\Logined;
use app\model\OperaCollection as Model;
use think\facade\Db;

class Operacollection extends Logined
{
    public function index()
    {
        $paginate = Model::where('opera_id', $this->param['opera_id'])->order('add_time asc')->paginate($this->param['limit'])->each(function ($item, $index){
            $item['feelog_info'] = Db::name('vmoneylog')->where('cid', $item['opera_collection_id'])->find();
            $item['is_pay'] = $item['feelog_info'] ? 1 : 0;
        });

        return $this->success('请求成功', [
            'paginate' => $paginate
        ]);
    }



}
